home *** CD-ROM | disk | FTP | other *** search
/ Beano - Dennis the Menace Cardz / Beano Cardz: Dennis the Menace.iso / pc / email.dxr / 00019_Sendup.ls < prev    next >
Encoding:
Text File  |  2001-04-19  |  1.1 KB  |  31 lines

  1. on mouseDown
  2.   global email
  3.   repeat while the stillDown
  4.     if rollover(20) then
  5.       set the member of sprite 20 to member("SendDown")
  6.     else
  7.       set the member of sprite 20 to member("SendUp")
  8.     end if
  9.     updateStage()
  10.   end repeat
  11.   set the member of sprite 20 to member("SendUp")
  12.   if rollover(20) then
  13.     if field("To") = EMPTY then
  14.       alert("No Recipients were specified.")
  15.     else
  16.       if field("From") = EMPTY then
  17.         alert("Your email address has not been specified. Before sending mail, you must specify a return address in the 'from' field.")
  18.       else
  19.         email = new(xtra("DirectEmail"), field("MailServer"), EMPTY, EMPTY)
  20.         sendSprite(8, #psTempFilePath, 2)
  21.         SendEmail(email, field("From"), field("To"), field("CC"), field("Bcc"), field("Subject"), field("Body"), field("Attachment"))
  22.         set the member of sprite 20 to member("SendDisabled")
  23.         set the member of sprite 21 to member("StopUp")
  24.         put "Sending....." into field "Status"
  25.         go(the frame + 1)
  26.       end if
  27.     end if
  28.     updateStage()
  29.   end if
  30. end
  31.